<extend name="./public/frame.html"/>
<block name="content">
	<blockquote class="layui-elem-quote search">
		<div class="layui-inline">
			<input type="text" name="user_phone" id="user_phone" placeholder="手机号码" class="layui-input">
		</div>
		<div class="layui-inline">
			<button class="layui-btn" data-type="search">搜索</button>
		</div>
	</blockquote>
	<table class="layui-table" lay-data="{width:'auto', height:'auto', url:'{:url('AdminActivity/couponDetail')}', page: true, limit: 10,where: { coupon_id: <?php echo $coupon_id;?>},id:'coupon'}" lay-filter="coupon">
		<thead>
		<tr>
			<th lay-data="{field:'coupon_id', width:80,fixed: true, sort: true,align:'center'}">ID</th>
			<th lay-data="{field:'uid', width:100,align:'center'}">用户ID</th>
			<th lay-data="{field:'user_phone', width:120,align:'center'}">领取用户</th>
			<th lay-data="{field:'coupon_price', width:100,align:'center'}">优惠券信息</th>
			<th lay-data="{field:'moneyTypeName', width:100,align:'center'}">优惠券类型</th>
			<th lay-data="{field:'valid_start_time', width:120,align:'center'}">有效日期(开始)</th>
			<th lay-data="{field:'valid_end_time', width:160,align:'center'}">有效日期(结束)</th>
			<th lay-data="{field:'useTypeName', width:100,align:'center'}">使用情况</th>
			<th lay-data="{field:'region_name', width:100,align:'center'}">城市</th>
			<th lay-data="{field:'order_type', width:80,align:'center'}">类型</th>
			<th lay-data="{field:'receiveTypeName', width:120,align:'center'}">领取状态</th>
			<th lay-data="{field:'receive_time', width:160,align:'center'}">领取时间</th>
			<th lay-data="{field:'supply_coupon_type', width:100,align:'center'}">发放状态</th>
			<th lay-data="{field:'time', width:160,align:'center'}">补发时间</th>
			<th lay-data="{field:'adminName', width:100,align:'center',fixed:'right'}">补发人</th>
		</tr>
		</thead>
	</table>

	<script>
		layui.use(['form','table'], function () {
			var table = layui.table,form = layui.form;
			//搜索
			$('.layui-btn').on('click', function () {
				var user_phone 	= $("#user_phone").val();
				table.reload('coupon', {
					url: '/admin/AdminActivity/couponDetail', where: {
						"user_phone": user_phone,
						"coupon_id":'<?php echo $coupon_id;?>'
					}
				});
			});
		});
	</script>
</block>
